package com.iyao_app.util;

import android.text.TextUtils;

import com.iyao_app.R;

/**
 * 作者 :  胡家兵
 * 时间 :  2017/11/29.
 */

public class MarkUtil {
    public static int getId(String type) {
        int defult = R.mipmap.ic_gongsi;
        try {
            if (!TextUtils.isEmpty(type)) {
                int t = Integer.parseInt(type.substring(0, 2));
                switch (t) {
                    case 1:

                        defult = R.mipmap.ic_qichefuwu;
                        break;

                    case 2:
                        defult = R.mipmap.ic_qichexiaoshou;
                        break;
                    case 3:
                        defult = R.mipmap.ic_qicheweixiu;
                        break;

                    case 4:
                        defult = R.mipmap.ic_motuoche;
                        break;
                    case 5:
                        defult = R.mipmap.ic_canying;
                        break;

                    case 6:
                        defult = R.mipmap.ic_gouwu;
                        break;
                    case 7:
                        defult = R.mipmap.ic_shenghuo;
                        break;
                    case 8:
                        defult = R.mipmap.ic_tiyu;
                        break;
                    case 9:
                        defult = R.mipmap.ic_yiliao;
                        break;
                    case 10:
                        defult = R.mipmap.ic_jiudian;
                        break;
                    case 11:
                        defult = R.mipmap.ic_fenjing;
                        break;

                    case 12:
                        defult = R.mipmap.ic_zhuzhai;
                        break;

                    case 13:
                        defult = R.mipmap.ic_zhengfu;
                        break;
                    case 14:
                        defult = R.mipmap.ic_kejiaowenhua;
                        break;
                    case 15:
                        defult = R.mipmap.ic_jiaotongsheshi;
                        break;
                    case 16:
                        defult = R.mipmap.ic_jinrong;
                        break;

                    case 17:
                        defult = R.mipmap.ic_gongsi;
                        break;
                    case 18:
                        defult = R.mipmap.ic_daolufushu;
                        break;


                    case 19:
                        defult = R.mipmap.ic_dizhi;
                        break;
                    case 20:
                        defult = R.mipmap.ic_gonggongsheshi;
                        break;

                    case 22:
                        defult = R.mipmap.ic_shijianhuodong;
                        break;
                    case 97:
                        defult = R.mipmap.ic_sheineisheishi;
                        break;

                    case 99:
                        defult = R.mipmap.ic_tongxingsheshi;
                        break;
                    default:
                        break;
                }
            }
        } catch (Exception e) {
            return defult;
        }
        return defult;
    }
    public static int getId_(String type) {
        int defult = R.mipmap.ic_gongsi_;
        try {
            if (!TextUtils.isEmpty(type)) {
                int t = Integer.parseInt(type.substring(0, 2));
                switch (t) {
                    case 1:

                        defult = R.mipmap.ic_qichefuwu_;
                        break;

                    case 2:
                        defult = R.mipmap.ic_qichexiaoshou_;
                        break;
                    case 3:
                        defult = R.mipmap.ic_qicheweixiu_;
                        break;

                    case 4:
                        defult = R.mipmap.ic_motuoche_;
                        break;
                    case 5:
                        defult = R.mipmap.ic_canying_;
                        break;

                    case 6:
                        defult = R.mipmap.ic_gouwu_;
                        break;
                    case 7:
                        defult = R.mipmap.ic_shenghuo_;
                        break;
                    case 8:
                        defult = R.mipmap.ic_tiyu_;
                        break;
                    case 9:
                        defult = R.mipmap.ic_yiliao_;
                        break;
                    case 10:
                        defult = R.mipmap.ic_jiudian_;
                        break;
                    case 11:
                        defult = R.mipmap.ic_fenjing_;
                        break;

                    case 12:
                        defult = R.mipmap.ic_zhuzhai_;
                        break;

                    case 13:
                        defult = R.mipmap.ic_zhengfu_;
                        break;
                    case 14:
                        defult = R.mipmap.ic_kejiaowenhua_;
                        break;
                    case 15:
                        defult = R.mipmap.ic_jiaotongsheshi_;
                        break;
                    case 16:
                        defult = R.mipmap.ic_jinrong_;
                        break;

                    case 17:
                        defult = R.mipmap.ic_gongsi_;
                        break;
                    case 18:
                        defult = R.mipmap.ic_daolufushu_;
                        break;


                    case 19:
                        defult = R.mipmap.ic_dizhi_;
                        break;
                    case 20:
                        defult = R.mipmap.ic_gonggongsheshi_;
                        break;

                    case 22:
                        defult = R.mipmap.ic_shijianhuodong_;
                        break;
                    case 97:
                        defult = R.mipmap.ic_sheineisheishi_;
                        break;

                    case 99:
                        defult = R.mipmap.ic_tongxingsheshi_;
                        break;
                    default:
                        break;
                }
            }
        } catch (Exception e) {
            return defult;
        }
        return defult;
    }
}
